/* 
 * File:   LexerTest.cpp
 * Author: stas
 * 
 * Created on 23 Октябрь 2009 г., 1:39
 */
#include "Lexer.h"
#include <cppunit/TestFixture.h>
#include <cppunit/TestAssert.h>
#include <cppunit/extensions/TestFactoryRegistry.h>
#include <cppunit/ui/text/TestRunner.h>


class LexerTest : public CppUnit::TestFixture {
  //CPPUNIT_TEST_SUITE_REGISTRATION( LexerTest );
  //CPPUNIT_TEST( testShouldCreateLexer() );
  //CPPUNIT_TEST_SUITE_END();

private:
    Lexer*  lexer;

public:
    LexerTest();
    LexerTest(const LexerTest& orig);
    virtual ~LexerTest();

      void setUp()
  {
          lexer = new Lexer();
  }

  void tearDown()
  {
      delete lexer;
  }

  void testShouldCreateLexer() {
      CPPUNIT_ASSERT(lexer != NULL );
  }
  
  int main(int argc, char* argv[]) {
      CppUnit::TextUi::TestRunner runner;

      CppUnit::TestFactoryRegistry &registry =
              CppUnit::TestFactoryRegistry::getRegistry();
       runner.addTest( registry.makeTest() );
      bool wasSuccessful = runner.run( "", false );
      return !wasSuccessful;
  }

};
